Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Gaussian Smoothening for images #443

Closed
wants to merge 15 commits into from
Closed

Adding Gaussian Smoothening for images #443

wants to merge 15 commits into from

Conversation

laxsuryavanshi
Copy link
Contributor

Description
Gaussian smoothening is the result of blurring an image with a Gaussian function.
The implementation here takes advantage of the separable property of the Gaussian filter by dividing the process into two passes.

Motivation
This PR is proposed as a solution to the competency test for GSoC 2020. I chose the project proposed in the ideas list "Image Processing Algorithms". If accepted, I could start implementing more algorithms like Wiener filter, Median filter, Histogram (even though proposed separately)

Reference
https://en.wikipedia.org/wiki/Gaussian_filter
http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/

Copy link
Member

@lpranam lpranam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the required changes further review can only be done after changes are submitted. Thank you for your contribution.

include/boost/gil/image_processing/filter.hpp Outdated Show resolved Hide resolved
typename gil::image<gil::gray8_pixel_t>::view_t temp_view = view(temp_img);
gil::gray8_view_t dst_view(temp_view);

gil::gaussian_filter(src_view, dst_view, 3, 1.0f);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of your this implementation, even Gaussian kernel generation requires additional test but as I have suggested the changes above it would not be required.

Copy link
Contributor Author

@laxsuryavanshi laxsuryavanshi Mar 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified output of the Gaussian Kernel Generation code with cv's getGaussianKernel function and I find it very much same up to some extent (precision after 4 decimals)

@mloskot
Copy link
Member

mloskot commented Mar 7, 2020

@laxsuryavanshi First, I'd like you to read two comments, #435 (comment) and #430 (comment), to learn more about the process of GSoC preparation and what to expect about your PR submitted as the competency test. You should also have a look at https://www.boost.org/community/gsoc.html

example/gaussian_blur.cpp Show resolved Hide resolved
include/boost/gil/image_processing/filter.hpp Outdated Show resolved Hide resolved
include/boost/gil/image_processing/filter.hpp Outdated Show resolved Hide resolved
include/boost/gil/image_processing/filter.hpp Outdated Show resolved Hide resolved
include/boost/gil/image_processing/filter.hpp Outdated Show resolved Hide resolved
@@ -0,0 +1,54 @@
#define BOOST_TEST_MODULE gil/test/core/image_processing/gaussian_filter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Licence and copyright notice is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants